package cn.kilo.infrastructure.persistent.dao;

import cn.kilo.domain.model.login.vo.LoginVo;
import cn.kilo.domain.model.order.entity.UserEntity;
import cn.kilo.infrastructure.persistent.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author kilok
 */
@Mapper
public interface IUserDao {
    int insertUser(@Param("user") User user);

    User queryUserByNameAndPass(@Param("user") LoginVo loginReq);

    void updateUserImage(@Param("userId") String userId,@Param("url") String url);


    int updateUserInfo(@Param("userId") String userId,
                        @Param("nickName") String nickName,
                        @Param("userName") String userName,
                        @Param("ridgepole") String ridgepole,
                        @Param("floor") Integer floor,
                        @Param("roomNumber") String roomNumber,
                       @Param("phoneNumber") String phoneNumber);

    User queryUserByUserName(@Param("userName") String userName);

    User queryUserInfoById(@Param("userId") String userId);

    User queryUserNameById(@Param("id") String id);

    User getIdByName(@Param("userName") String staffName);

    int setUserToStaff(@Param("userId") String staffId);

    User queryUserByStuId(@Param("stuId") String stuId);

    User queryUserByStuIdAndPassWord(@Param("user") LoginVo loginReq);

    void setFirstLogin(@Param("stuId") String stuId);

    int setPost(@Param("user") UserEntity user);

    Integer getUserNumber();

    Integer getMothUser(@Param("dayTime") String dayTime);


}
